0 REM TOTAL MUSIC 64 *** 5 GOSUB 12000 10 CLR: REM VOICE 1 NOTES 15 DIM HI(200),LO(200),LN$(200):REM TOTAL NUMBER OF NOTES POSSIBLE IS 200 20 POKE53281,1:POKE53280,1:PRINTCHR$(144)CHR$(147) 30 UP$=CHR$(145):LF$=CHR$(157) 40 FORS=54272TO54296:POKES,0:NEXT 50 SV=54296:SH=54273:SL=54272:SA=54277:SS=54278:SW=54276 100 PRINT"VOLUME [1-15]";CHR$(32)CHR$(32)"15" 101 PRINTUP$;:FORX=1TO13:PRINTCHR$(29);:NEXTX 102 INPUTV1$ 105 V1=VAL(V1$) 110 IFV1<1ORV1>15THENGOSUB7000 114 IFV1<1ORV1>15THENPRINTUP$UP$UP$:GOTO100 125 FORX=1TO22:PRINTCHR$(32);:NEXT:PRINT 200 PRINT"WAVEFORM" 202 PRINTTAB(10)CHR$(18)"T";CHR$(146);"RIANGULAR" 204 PRINTTAB(10)CHR$(18)"S";CHR$(146);"AWTOOTH" 206 PRINTTAB(10)CHR$(18)"P";CHR$(146);"ULSE" 208 PRINTTAB(10)CHR$(18)"N";CHR$(146);"OISE";CHR$(32)CHR$(32)"T" 209 PRINTUP$;:FORX=1TO15:PRINTCHR$(29);:NEXT:INPUTW1$ 210 IFW1$="T"THENW1=17:PRINT:GOTO300 212 IFW1$="S"THENW1=33:PRINT:GOTO300 214 IFW1$="P"THENW1=65:PRINT:GOTO300 216 IFW1$="N"THENW1=129:PRINT:GOTO300 220 IFW1$<>"N"THENGOSUB7000 226 IFW1$<>"N"THEN FORX=1TO6:PRINTUP$;:NEXT:PRINT:GOTO200 300 PRINT"ATTACK/DECAY [0-240]";CHR$(32)CHR$(32)"0" 302 PRINTUP$;:FORX=1TO20:PRINTCHR$(29);:NEXTX:INPUTA1$ 310 A1=VAL(A1$) 320 IFA1<0ORA1>240THENGOSUB7000 330 IFA1<0ORA1>240THENPRINTUP$UP$:GOTO300 400 PRINT"SUSTAIN/RELEASE [0-240]";CHR$(32)CHR$(32)"240" 402 PRINTUP$;:FORX=1TO23:PRINTCHR$(29);:NEXTX:INPUTS1$ 410 S1=VAL(S1$) 420 IFS1<0ORS1>240THENGOSUB7000 430 IFS1<0ORS1>240THENPRINTUP$UP$:GOTO400 450 PRINT:PRINT"DURATION OF NOTE";CHR$(32)CHR$(32)"128" 451 PRINTUP$;:FORX=1TO16:PRINTCHR$(29);:NEXTX:INPUTD1$ 452 IFLEFT$(D1$,1)<"0"ORLEFT$(D1$,1)>"9"THENGOSUB7000 454 IFLEFT$(D1$,1)<"0"ORLEFT$(D1$,1)>"9"THENPRINTUP$UP$UP$:GOTO450 456 D1=VAL(D1$):PRINT 458 FORX=1TO400:NEXTX 460 PRINTCHR$(147)CHR$(18)"F3"CHR$(146)" PRINT & PLAY"; 461 PRINTTAB(24)CHR$(18)"F7"CHR$(146)" RESTART" 462 PRINTCHR$(18)" P"CHR$(146)" PAUSE"; 463 PRINTSPC(12)CHR$(18)"RETURN"CHR$(146)" LINE FEED" 464 PRINTCHR$(18)" "CHR$(94)CHR$(146)" ERASE ALL"; 465 PRINTSPC(6)CHR$(18)"INST/DEL"CHR$(146)" ERASE NOTE" :PRINT:PRINT 467 FORMD=0TO39:POKE1624+MD,67:POKE55896+MD,12:NEXTMD 480 GETA$:IFA$=""THEN480 499 REM **** A$ SELECTION FOR NOTES- OCTAVE 4 500 IFA$=CHR$(65)THEN HI=28:LO=49:GOTO700: REM A 510 IFA$=CHR$(193)THEN HI=29:LO=223:A$="A#":GOTO700:REM A# 520 IFA$=CHR$(66)THEN HI=15:LO=210:GOTO700: REM B ** NOTE OCTAVE 3 NOT 4 *** 530 IFA$=CHR$(67)THEN HI=16:LO=195:GOTO700: REM C 540 IFA$=CHR$(195)THEN HI=17:LO=195:A$="C#":GOTO700:REM C# 550 IFA$=CHR$(68)THEN HI=18:LO=209:GOTO700: REM D 560 IFA$=CHR$(196)THEN HI=19:LO=239:A$="D#":GOTO700:REM D# 570 IFA$=CHR$(69)THEN HI=21:LO=31:GOTO700: REM E 580 IFA$=CHR$(70)THEN HI=22:LO=96:GOTO700: REM F 590 IFA$=CHR$(198)THEN HI=23:LO=181:A$="F#":GOTO700:REM F# 600 IFA$=CHR$(71)THEN HI=25:LO=30:GOTO700: REM G 610 IFA$=CHR$(199)THEN HI=26:LO=156:A$="G#":GOTO700:REM G# 620 IFA$=CHR$(80)THEN HI=0:LO=0:A$="P":GOTO700: REM PAUSE 635 IFA$=CHR$(134)THEN 9000:REM F3 GOTO PUTTING DATA INTO ARRAYS 640 IFA$=CHR$(136)THEN10:REM F7 RESTART 645 IFA$=CHR$(13)THENPRINTUP$CHR$(13):GOTO480:REM RETURN- LINE FEED 650 IFA$=CHR$(20)THENHI=0:LO=0:PRINTCHR$(157)CHR$(157)CHR$(32);:GOTO480 651 REM LINE650 -INST/DEL ERASE SINGLE NOTE 660 IFA$=CHR$(94)THENGOTO460:REM UP ARROW SYMBOL CLEAN UP SCREEN 690 IFA$<>CHR$(80)THENHI=0:LO=0:GOTO480 700 POKESH,HI:POKESL,LO:POKESA,A1:POKESS,S1:POKESW,W1:POKESV,V1 740 FORX=1TOD1:NEXTX 750 PRINTA$;" ";:POKESV,16:POKESW,W1-1 800 GOTO480 1999 *** REM PLAY THE TUNE *** 2000 IFN=0 THEN RETURN 2005 FORX=54272 TO 54296:POKES,0:NEXTX 2010 FORNN=0TON-1:POKESH,HI(NN):POKESL,LO(NN) 2020 POKESA,A1:POKESS,S1:POKESW,W1:POKESV,V1 2030 FORX=1TOD1:NEXTX 2040 NEXTNN:POKESV,16:POKESW,W1-1 2050 RETURN 2999 REM *** PRINT NOTES USING LETTERS *************************************** 3000 PRINT 3002 QT$="NOTES BY LETTER":GOSUB10000:FORX=1TO500:NEXTX 3005 QT$="TURN PRINTER ON":GOSUB 10000:FORX=1TO500:NEXTX 3010 QT$="GIVE TUNE A NAME":GOSUB10000:PRINTUP$:PRINTTAB(16);:INPUTAW$ 3020 OPEN1,4 3030 PRINT#1,AW$:PRINT#1 3040 FORNN=0TON-1:PRINT#1,LN$(NN);:PRINT#1," ";:NEXTNN 3050 PRINT#1:PRINT#1,"TOTAL NOTE COUNT=";NN;"PLUS -1,-1" 3090 PRINT#1:CLOSE1:GOTO9200 3095 PRINTUP$;:FORX=0TO39:PRINTCHR$(32);:NEXTX:PRINTUP$UP$UP$:PRINT 3100 QT$="FINISHED":GOSUB10000:GOTO9200 7000 QT$="NOT A LEGAL CHOICE":GOSUB10000:FORX=1TO50:NEXTX 7010 PRINTUP$:FORX=1TO30:PRINTCHR$(32);:FORY=1TO25:NEXTY:NEXTX:RETURN 7999 REM *** DATA LINE ONLY PRINT *** 8000 PRINT 8002 QT$="PRINT DATA ONLY":GOSUB10000:FORX=1TO500:NEXTX 8005 QT$="TURN PRINTER ON":GOSUB10000:FORX=1TO500:NEXTX 8010 QT$="GIVE TUNE A NAME":GOSUB10000:PRINTUP$:PRINTTAB(16);:INPUTAW$ 8020 OPEN1,4 8030 PRINT#1,AW$:PRINT#1 8040 FORNN=0TON-1:PRINT#1,HI(NN);",";LO(NN);",";:NEXTNN:PRINT#1,"-1,-1" 8045 PRINT#1:PRINT#1,"TOTAL NOTE COUNT=";NN*2;"PLUS -1,-1" 8050 PRINT#1:CLOSE1:RETURN 8499 REM *** TOTAL PROGRAM PRINT *** 8500 PRINT 8510 QT$="PRINT ROUTINE":GOSUB10000:FORX=1TO500:NEXTX 8520 QT$="TURN PRINTER ON":GOSUB10000:FORX=1TO500:NEXTX 8530 QT$="GIVE TUNE A NAME":GOSUB10000:PRINTUP$:PRINTTAB(16);:INPUTAW$ 8550 OPEN1,4 8560 PRINT#1,AW$ 8565 PRINT#1 8570 PRINT#1,"100 FOR S=54272 TO 54296 : POKE S,0 : NEXT S" 8580 PRINT#1,"110 READ SH,SL" 8590 PRINT#1,"120 IF SH=-1 THEN 180" 8600 PRINT#1,"130 POKE 54273, SH : POKE 54272, SL" 8610 PRINT#1,"140 POKE 54277,";A1;": POKE 54278,";S1;": POKE 54276,";W1 8620 PRINT#1,"150 POKE 54296,";V1 8630 PRINT#1,"160 FOR X=1 TO ";D1;": NEXT X" 8640 PRINT#1,"170 GOTO 110" 8645 PRINT#1,"180 POKE 54296,0 : POKE 54276,";W1-1 8650 PRINT#1,"200 DATA "; 8660 FORNN=0TON-1:PRINT#1,HI(NN);",";LO(NN);",";:NEXTNN:PRINT#1,"-1,-1" 8690 PRINT#1:PRINT#1,"TOTAL NOTE COUNT=";NN*2;"PLUS -1,-1" 8700 PRINT#1:CLOSE1:GOTO9200:REM BACK FOR ANOTHER A$ *************** 8999 REM PUT DATA INTO ARRAYS 9000 PRINTCHR$(19);:FORX=0TO199:PRINTCHR$(32);:NEXTX 9005 PRINTCHR$(19); 9010 PRINTCHR$(18)"F1"CHR$(146)" DATA ONLY"; 9011 PRINTTAB(15)CHR$(18)"F2"CHR$(146)" TOTAL PRINT" 9020 PRINTUP$;CHR$(18)"F3"CHR$(146)" PRATICE"; 9022 PRINTSPC(5)CHR$(18)"F4"CHR$(146)" PRINT NOTES" 9025 PRINTCHR$(18)"F5"CHR$(146)" PLAY TUNE"; 9030 PRINTTAB(15)CHR$(18)"F6"CHR$(146)" DURATION" 9031 PRINTUP$;CHR$(18)"F7"CHR$(146)" RESTART" 9032 PRINTCHR$(18)" P"CHR$(146)" PAUSE"; 9035 PRINTSPC(7)CHR$(18)" "CHR$(94)CHR$(146)" ERASE ALL" 9040 PRINTCHR$(19):FORX=1TO11:PRINT:NEXTX:REM POSITION LINE ON GREY LINE 9100 PRINT"INPUT NOTES INTO ARRAY ROUTINE";UP$ 9150 A$=CHR$(94):GOTO9345:REM GET SCREEN AND N SET UP PROPERLY 9200 GETA$:IFA$=""THEN9200 9210 IFA$=CHR$(65)THEN HI(N)=28:LO(N)=49:GOTO9400:REM A 9220 IFA$=CHR$(193)THEN HI(N)=29:LO(N)=223:A$="A#":GOTO9400:REM A# 9230 IFA$=CHR$(66)THEN HI(N)=15:LO(N)=210:GOTO9400:REM B *NOTE OCTAVE 3 NOT 4* 9240 IFA$=CHR$(67)THEN HI(N)=16:LO(N)=195:GOTO9400:REM C 9250 IFA$=CHR$(195)THEN HI(N)=17:LO(N)=195:A$="C#":GOTO9400:REM C# 9260 IFA$=CHR$(68)THEN HI(N)=18:LO(N)=209:GOTO9400:REM D 9270 IFA$=CHR$(196)THEN HI(N)=19:LO(N)=239:A$="D#":GOTO9400:REM D# 9280 IFA$=CHR$(69)THEN HI(N)=21:LO(N)=31:GOTO9400:REM E 9290 IFA$=CHR$(70)THEN HI(N)=22:LO(N)=96:GOTO9400:REM F 9300 IFA$=CHR$(198)THEN HI(N)=23:LO(N)=181:A$="F#":GOTO9400:REM F# 9310 IFA$=CHR$(71)THEN HI(N)=25:LO(N)=30:GOTO9400:REM G 9320 IFA$=CHR$(199)THEN HI(N)=26:LO(N)=156:A$="G#":GOTO9400:REM G# 9330 IFA$=CHR$(80)THEN HI(N)=0:LO(N)=0:GOTO9400:REM P PAUSE 9335 IFA$=CHR$(133)THENGOSUB8000:GOTO9200:REM F1 PRINT DATA ONLY 9340 IFA$=CHR$(137)THENGOSUB8500:GOTO9200:REM F2 PRINT ROUTINE 9341 IFA$=CHR$(134)THENPRINTCHR$(147):N=0:GOTO458:REM F3 TO PRATICE PLAY 9342 IFA$=CHR$(135)ANDN=0THEN9200 9343 IFA$=CHR$(135)THENGOSUB2000:GOTO9200:REM F5 PLAY THE TUNE 9344 IFA$=CHR$(136)THEN10:REM F7 START ALL OVER 9345 IFA$=CHR$(94)THEN10090 9346 IFA$=CHR$(138)THENGOTO3000:REM F4 - PRINT NOTES USING LETTERS 9347 IFA$=CHR$(139)THENPRINT:PRINT"DURATION";:INPUT D1:GOTO9200:REM F6 DURATION 9350 IFA$<>CHR$(80)THEN GOTO9200 9400 POKESH,HI(N):POKESL,LO(N):POKESA,A1:POKESS,S1:POKESW,W1:POKESV,V1 9410 FORX=1TOD1:NEXTX 9420 PRINTA$;" ";:POKESV,16:POKESW,W1-1:LN$(N)=A$:REM PUT LN - LIST NOTES 9440 N=N+1:GOTO9200 :REM INCREASE ARRAY COUNT & GO BACK FOR ANOTHER NOTE 9999 REM *** THIS IS SCROLL TYPE ROUTINE************************************** 10000 FORI=0TOLEN(QT$) 10010 POKESV,7:POKESH,126:POKESL,6:POKESA,120:POKESS,30:POKESW,33 10020 PRINTLEFT$(QT$,I+1):POKESV,0:POKESW,32 10030 PRINTUP$UP$:FORX=1TO40:NEXTX:NEXTI 10040 FORS=54272TO54296:POKES,0:NEXTS 10050 FORX=1TO100:NEXTX:RETURN 10089 REM *** CLEAN UP ARRAY SCREEN ****************************************** 10090 ER=N+79:REM ER = ERASE NOTES IN ARRAY 10100 FORMD=0TOER:POKE1664+MD,160:POKE1664+MD+1,62 10105 POKE55936+MD,1:POKE55936+MD+1,2:NEXTMD 10110 PRINTCHR$(19):FORX=1TO12:PRINT:NEXTX 10120 N=0:GOTO9200 11999 REM *** TITLE SCREEN *************************************************** 12000 PRINTCHR$(147)CHR$(5):POKE53281,0:POKE53280,0 12002 FORS=54272TO54296:POKES,0:NEXT 12004 SV=54296:SH=54273:SL=54272:SA=54277:SS=54278:SW=54276:UP$=CHR$(145) 12010 FORX=1TO5:PRINT:NEXTX 12020 PRINT"TOTAL MUSIC 64":PRINT 12030 QT$="1984":GOSUB10000:PRINT:PRINT 12040 QT$="BY GARY FIELDS":GOSUB10000:FORX=1TO500:NEXTX 12050 PRINTUP$UP$UP$:QT$="VOICE 1 / OCTAVE 4":GOSUB10000:PRINT:PRINT 12060 QT$="THIS AID CONVERTS SOUND TO DATA":GOSUB10000:PRINT:PRINT 12065 QT$="F1- DATA ONLY PRINT":GOSUB10000:PRINT 12066 QT$="F2- TOTAL PROGRAM W/DATA":GOSUB10000:PRINT 12067 QT$="F4- CONVERTS DATA TO NOTES":GOSUB10000:PRINT 12070 FORX=1TO500:NEXTX 12080 PRINTCHR$(147) 12090 PRINTCHR$(18)" LETTER = NOTE ":PRINT 12100 PRINT" A = A " 12102 PRINT" B = B " 12104 PRINT" C = C " 12106 PRINT"SHIFT/C = C# " 12108 PRINT" D = D " 12110 PRINT"SHIFT/D = D# " 12112 PRINT" E = E " 12114 PRINT" F = F " 12116 PRINT"SHIFT/F = F# " 12118 PRINT" G = G " 12120 PRINT"SHIFT/G = G# " 12122 PRINT" P = PAUSE":PRINT 12124 PRINTCHR$(18)"OTHER KEYS ARE EMPTY":FORX=0TO39:PRINTCHR$(45);:NEXTX 12125 PRINT"UP TO 200 NOTES CAN BE CONSTRUCTED" 12128 QT$="NOTES CAN BE ":GOSUB10000:PRINT 12129 QT$="PLAYED AS NOTES":GOSUB10000:FORX=1TO100:NEXTX 12132 QT$="PRINTED AS DATA":GOSUB10000:FORX=1TO100:NEXTX 12134 QT$="LISTED AS NOTES":GOSUB10000:FORX=1TO100:NEXTX 12136 QT$="PRINTED AS A PROGRAM INCLUDING DATA":GOSUB10000:PRINT 12200 PRINT" TO BEGIN": 12210 GET A$:IFA$=""THEN12210 12500 RETURN:REM ** BACK TO MAIN PROGRAM **************************************